package com.sz.jinzheng.controller;

import com.sz.jinzheng.model.ApplicationResults;
import com.sz.jinzheng.model.PageBean;
import com.sz.jinzheng.model.Result;
import com.sz.jinzheng.service.ApplicationResultsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/inspector")
public class ApplicationResultsController {
    @Autowired
    private ApplicationResultsService applicationResultsService;

    @RequestMapping("/getApplicationResults")
    public Result getApplicationResults(int index, int size) {
        log.info(String.valueOf(index));
        PageBean<ApplicationResults> results = applicationResultsService.getApplicationResults(index, size);

        return new Result(200, "查询成功", results);
    }
}
